<include file="public@header"/>
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('store/room')}">库房管理</a></li>
			<li><a href="{:url('store/add')}">库房添加</a></li>
		</ul>
        <div>
       	<form  class="well form-search" action="{:url('store/room')}" method="get">
        <label>{:lang('库房名称')}: 
        <input type="text" name="room_name" placeholder="请输入库房名称"value="{:input('request.room_name')}" class="form-control"> </label>    	
        <input type="submit" class="btn btn-primary" value="搜索" />
        <a class="btn btn-danger" href="{:url('store/room')}">清空</a>
        </form>
        </div>
		<form action="{:url('Rbac/listorders')}" method="post">
			<table class="table table-hover table-bordered">
				<thead>
					<tr>
                        <th width="3%">ID</th>
						<th>{:lang('库房名称')}</th>
						<th>{:lang('添加时间')}</th>
						<th>{:lang('添加人')}</th>
						<th>{:lang('STATUS')}</th>
						<th>{:lang('ACTIONS')}</th>
					</tr>
				</thead>
				<tbody>
					<foreach name="results" item="vo">
					<tr>
						<td>{$vo.id}</td>
						<td>{$vo.room_name}</td>
						<td><php>echo date('Y-m-d H:i:s', $vo['add_time'])</php></td>
						<td>{$vo.user_login}</td>
						<td>
							<if condition="$vo['if_show'] eq 1">
								<font color="red">√</font>
							<else /> 
								<font color="red">╳</font>
							</if>
						</td>
						<td>
							<a href="{:url('store/edit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
                            |
                            <a href="{:url('store/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>
                            |
                            <a class="js-ajax-delete" data-msg="确定更改显示状态吗？"
                            	href="{:url('store/toggle',array('id'=>$vo['id'],'show'=>$vo['if_show']))}">{:lang('TOGGLE')}</a>
                        </td>
					</tr>
					</foreach>
				</tbody>
			</table>
			<div class="pagination">{$page}</div>
		</form>

	</div>
	<script type="text/javascript" src="__STATIC__/js/admin.js?v={:time()}"></script>
</body>
</html>